﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;

namespace MOJsdk
{
    public interface IMetaData : IEquatable<IMetaData>
    {
        string Identifier { get; }
        UserControl Control { get; }
        string LoadedMovie { get; }

        double Width { get; }
        double Height { get; }

        void LoadMovie(string MovieCode);
        void ReloadMovie();
        void Save();

        event CallEventHandler OnMovieInfoUpdated;
    }
    public class EmptyMetaData : IMetaData
    {
        public EmptyMetaData()
        {
            OnMovieInfoUpdated += delegate { };
        }

        public string Identifier { get { return "Empty"; } }
        public UserControl Control { get { return null; } }
        public string LoadedMovie { get { return null; } }

        public double Width { get { return 400; } }
        public double Height { get { return 400; } }

        public void LoadMovie(string MovieCode) { }
        public void ReloadMovie() { }
        public void Save() { }

        public event CallEventHandler OnMovieInfoUpdated;

        public bool Equals(IMetaData data)
        {
            return Identifier == data.Identifier;
        }
    }
}
